<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>index</title>
    <style>
        .demo a{
            /*去除a链接下划线*/
            text-decoration: none;
            border-radius: 10px;
            height: 50px;
            width: 50px;
            background: yellow;
            margin-right: 5px;
            display: block;
            float: left;
            font: bold 20px/50px Arial;
            text-align: center;
        }
        /*
            =绝对等于
            *=包含这个元素
            ^=以这个开头
            $=以这个结尾
        */
        a[class=a1]{
           background: red;
        }
    </style>
</head>
<body>
<p class="demo">
    <a href="" class="a1">1</a>
    <a href="" class="a2">2</a>
    <a href="">3</a>
    <a href="">4</a>
    <a href="">5</a>
    <a href="">6</a>
</p>
</body>
</html>